from django.urls import path
from rest_framework.routers import SimpleRouter

from .views import CommentViewSet, CommentListViewSet, CommentChildListViewSet

app_name = 'comment'
urlpatterns = [
    path('comments/', CommentListViewSet.as_view()),   #查询评论
    path('child_comments/', CommentChildListViewSet.as_view())
]

router = SimpleRouter()
router.register('', CommentViewSet)  # 个人评论操作
urlpatterns += router.urls
